#!usr/bin/env python
# -*- coding:utf-8 _*-
""" 
@author:robot
@file: tap_connector16_hive.py
@version:
@time: 2022/01/13 
pip install sasl
pip install thrift
pip install thrift-sasl
pip install pyhive
"""
from pyhive import hive
from TapClientConnector.connector import TAPMysqlConnector


class TAPHiveConnector(TAPMysqlConnector):

    def __init__(self, kwargs):
        super(TAPMysqlConnector, self).__init__(kwargs)
        pop_user = self.FORMAT_DB_INFO.pop('user')
        self.connector = hive.connect(**self.FORMAT_DB_INFO)
